package cn.java.exercises;

public class VehicleDemo
{
    public static void main(String[] args)
    {
        Vehicle vehicle=new Plane();
        vehicle.getDriverTime();
        vehicle=new Car();
        vehicle.getDriverTime();
        vehicle=new Ship();
        vehicle.getDriverTime();

        System.out.println("交通工具是"+Plane.name);
        System.out.println("汽车百公里油耗是"+new Car().getFuelConsumption()+"升");
    }
}
